import request from '@/utils/request'
let baseUrl =
  process.env.NODE_ENV === 'production' ? 'api/core' : 'http://172.16.0.14:8020'

export const saveTemplate = (data: any) =>
  request({
    baseURL: baseUrl,
    url: '/messageTemplate/saveTemplate',
    method: 'post',
    data
  })

export const modifyByIdTemplate = (data: any) =>
  request({
    baseURL: baseUrl,
    url: '/messageTemplate/modifyByIdTemplate',
    method: 'post',
    data
  })
export const getPageTemplateModel = (data: any) =>
  request({
    baseURL: baseUrl,
    url: '/messageTemplate/getPageTemplateModel',
    method: 'post',
    data
  })

export const saveScene = (data: any) =>
  request({
    baseURL: baseUrl,
    url: '/messageScene/saveScene',
    method: 'post',
    data
  })
export const modifyByIdScene = (data: any) =>
  request({
    baseURL: baseUrl,
    url: '/messageScene/modifyByIdScene',
    method: 'post',
    data
  })
export const getPageSceneModel = (data: any) =>
  request({
    baseURL: baseUrl,
    url: '/messageScene/getPageSceneModel',
    method: 'post',
    data
  })
export const getPageRecord = (data: any) =>
  request({
    baseURL: baseUrl,
    url: '/messageRecord/getPageRecord',
    method: 'post',
    data
  })
export const sceneBindTemplate = (data: any) =>
  request({
    baseURL: baseUrl,
    url: '/sceneTemplate/sceneBindTemplate',
    method: 'post',
    data
  })
export const getPageSceneTemplateModel = (data: any) =>
  request({
    baseURL: baseUrl,
    url: '/sceneTemplate/getPageSceneTemplateModel',
    method: 'post',
    data
  })

export const modifySceneTemplateById = (data: any) =>
  request({
    baseURL: baseUrl,
    url: '/sceneTemplate/modifySceneTemplateById',
    method: 'post',
    data
  })
